#/*************************************************************************
#    > File Name: String_Operation.py
#    > Author: Yan Wang
#    > Mail: wangyan@imnu.edu.cn
#    > Created Time: Fri 03 Jun 2022 05:33:10 PM CST
# ************************************************************************/
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def Extract_Key_from_Yaml_Line(strings):
	key= strings.split(':',2)[0]   #切片处理，以：分割，切片两次，取第一个值
	return(key)

def List_to_String(data_list):
	#output_string=[", ".join(map(str,alist)) for alist in data_list]
	string_list=[str(alist) for alist in data_list]
	output_string=",".join(string_list)   #在给出列表每个元素后面添加','
	return(output_string)